#pragma once

#include <QMenubar>
#include <QAction>
#include <QMainWindow>
#include <QMenu>
#include <QToolBar>

namespace ParticleEditor
{
	class ParticleViewWidget;

	class MainWindow :  public QMainWindow
	{
		Q_OBJECT
	public:
		MainWindow(QMainWindow* parent = NULL);
		virtual ~MainWindow(void);

		void setupUI();
		void loadFile(const QString& filename, bool import = false);
	private:
		void setupMenus();
		void setupToolBar();
		ParticleViewWidget*						_particleViewWidget;
		QMenu*									_fileMenu;
		QAction*								_actionNewFile;
		QAction*								_actionOpenFile;
		QAction*								_actionSaveFile;
		QAction*								_actionAddReferenceObject;
		QAction*								_actionSelected;
		QAction*								_actionTranslate;
		QAction*								_actionRotate;
		QAction*								_actionUndo;
		QAction*								_actionRedo;
		QAction*								_actionCopy;
		QAction*								_actionRestore;
		QToolBar*								_editToolBar;
		void toggleActionState(bool b);
	private slots:
		void referenceObjectLoaded();
		void slotNewFile();
		void slotOpenFile();
		void slotSaveFile();
		void slotSelected();
		void slotTranslate();
		void slotRotate();
		void slotUndo();
		void slotRedo();
		void slotCopy();
		void slotRestore();
	};
}